package com.smalluz.ad.modules.oe.api.impl;

import com.smalluz.ad.modules.common.enums.MediaApiUrl;
import com.smalluz.ad.modules.oe.api.OeReportService;
import com.smalluz.ad.modules.oe.api.OeService;
import com.smalluz.ad.modules.oe.bean.AdReportRequest;
import com.smalluz.ad.modules.oe.result.AdReportResult;

import lombok.RequiredArgsConstructor;

/**
 * @author biteam
 * @Title: OeReportServiceImpl
 * @Description: TODO(描述)
 * @site http://www.smalluz.com/
 * @email 510711793@qq.com
 * @date 2022-06-16 21:51
 */
@RequiredArgsConstructor
public class OeReportServiceImpl implements OeReportService {

    private final OeService oeService;

    @Override
    public AdReportResult getAdReport(AdReportRequest request) {
        String resultContent = oeService.get(MediaApiUrl.TTReport.REPORT_AD_GET, request);
        return AdReportResult.fromJson(resultContent);
    }
}
